package org.javaboy.meeting.mapper;

import org.apache.ibatis.annotations.Param;
import org.javaboy.meeting.model.Employee;

import java.util.List;

public interface EmployeeMapper {
    /**
     * 登录进行用户姓名查找
     * @param username
     * @return
     */
    Employee loadEmpByUsername(String username);

    Integer doReg(Employee employee);

    List<Employee> getAllEmpsByStatus(Integer status);

    Integer updatestatus(@Param("employeeid") Integer employeeid, @Param("status") Integer status);

    List<Employee> getAllEmps(@Param("emp") Employee employee, @Param("page") Integer page, @Param("pagesize") Integer pageSize);

    Long getTotal(Employee employee);

    List<Employee> getEmpByDepId(Integer depId);

    Employee getEmpByEmpId(Integer reservationistid);

    List<Employee> getEmpByMeetingId(Integer meetingid);
    //分页新增
    List<Employee> getEmpsbyPage(@Param("start") Integer start, @Param("size") Integer size, @Param("status") Integer status);

    Integer getCount(Integer status);

    List<Employee> searchEmpsbyPage(@Param("start") Integer start, @Param("size") Integer size,
                                    @Param("name") String employeename, @Param("username") String username,
                                    @Param("status") Integer status);

    Integer getSearchCount(@Param("name") String employeename, @Param("username") String username,
                           @Param("status") Integer status);
}
